home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
System
/
MRAC
/
Intervals
/
g-interval
next >
Wrap
Text File
|
1998-08-11
|
997b
|
29 lines
g-interval seed type count integer
type :nil :shuffle :rnd
This function is able to generate single or multiple lists of intervals from a single or multiple source lists. Notice in the examples that the integer list order is shuffled and some integers become minus values.
(g-interval .34 :shuffle 1 '(1 2 6 11 13 14))
=> (2 6 1 -14 13 -11)
(g-interval .34 :nil 2 '(1 2 6 11 13 14))
=> ((1 2 6 -11 13 -14) (-1 2 6 -11 -13 14))
(g-interval .34 :shuffle 2 '(1 2 6 11 13 14))
=> ((2 6 1 -14 13 -11) (-11 6 1 -14 -13 2))
(g-interval .34 :rnd 2 '((1 2 6 11 13 14) (1 2 6)))
=> ((2 6 1 -14 13 -11) (-11 6 1 -14 -13 2) (1 6 2) (2 -1 6))
(g-interval .78 :shuffle '(2 4) '((1 2 6 11 13 14) (1 2 6)))
=> ((6 -2 13 14 -1 -11) (14 6 -2 -1 -11 -13)
(-2 6 -1) (-2 6 -1) (-2 6 1) (-6 -2 -1))
(g-interval .78 :rnd '(2 2 1 2 1) '((1 2 6 11 13 14) (1 2 6)))
=> ((1 -2 6 11 -13 -14) (14 6 -2 -1 -11 -13)
(-2 6 -1) (-1 2 -6)
(-1 2 -6 -11 13 14)
(-2 6 1) (-1 -2 -6)
(-1 -2 -6 -11 13 -14))